package com.retallife.business.service.Complaint.Impl;


import com.retallife.business.dao.Complaint.ComplaintMapper;
import com.retallife.business.pojo.Complaint.UserComplaintVo;
import com.retallife.business.service.Complaint.ComplaintService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ComplaintServiceImpl implements ComplaintService {

    @Autowired
    ComplaintMapper complaintMapper;

    /**
     * 查询所有用户的投诉信息
     * @return 投诉的信息
     */
    public List<UserComplaintVo> AdminFindComplaintAll() {
        return complaintMapper.AdminFindComplaintAll();
    }

    /**
     * 查询用户自己的投诉信息
     * @return 投诉的信息
     */
    public List<UserComplaintVo> AdminFindComplaints(String userComplaintName) {
        return complaintMapper.AdminFindComplaints(userComplaintName);
    }
    /**
     * 回复用户提交的投诉信息
     * @param userComplaintName
     * @return 是否成功
     */
    public int AdminUpdateComplaints(String userComplaintName) {
        return complaintMapper.AdminUpdateComplaints(userComplaintName);
    }

}
